interface Person{
    firstName:string;
    lastName:string;
}
//定义类 继承接口
class ClassPerson implements Person{
    testName:string;
    firstName: string;
    lastName: string;
    constructor (firstName :string,lastName :string,testName :string){
        this.testName = testName;
        this.firstName = firstName;
        this.lastName = lastName;
    }
}
//参数: ClassPerson对象
function getClassToString(classPerson :ClassPerson){
    return "hello2, "+classPerson.firstName+"  "+classPerson.lastName+" "+classPerson.testName;
}

//创建 ClassPerson对象
let classPerson = new ClassPerson("firstName","lastName","test");

console.log(getClassToString(classPerson));